SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].RecibosPagosDeleteCommand
(
	@Original_ID numeric(10, 0),
	@Original_ID_CLIENTE numeric(10, 0),
	@Original_ID_USUARIO numeric(10, 0),
	@Original_FECHA datetime,
	@IsNull_REFERENCIA Int,
	@Original_REFERENCIA varchar(30),
	@Original_M_TOTAL numeric(10, 2),
	@Original_M_DESCUENTO numeric(10, 2),
	@IsNull_OBSERVACIONES Int,
	@Original_OBSERVACIONES varchar(150)
)
AS
	SET NOCOUNT OFF;
DELETE FROM [RECIBOS_PAGOS] WHERE (([ID] = @Original_ID) AND ([ID_CLIENTE] = @Original_ID_CLIENTE) AND ([ID_USUARIO] = @Original_ID_USUARIO) AND ([FECHA] = @Original_FECHA) AND ((@IsNull_REFERENCIA = 1 AND [REFERENCIA] IS NULL) OR ([REFERENCIA] = @Original_REFERENCIA)) AND ([M_TOTAL] = @Original_M_TOTAL) AND ([M_DESCUENTO] = @Original_M_DESCUENTO) AND ((@IsNull_OBSERVACIONES = 1 AND [OBSERVACIONES] IS NULL) OR ([OBSERVACIONES] = @Original_OBSERVACIONES)))
GO
